using System;
using System.Collections.Generic;
using System.Text;

namespace OrbitOne.SharePoint.Provision.WebParts
{
    internal class Helper
    {
        public static string GetUserNameFromIdentity(string identityName)
        {
            if (identityName.Contains("\\"))
                return identityName.Substring(identityName.LastIndexOf("\\") + 1);
            else
                return identityName;
        }

        public static string GetDomainNameFromIdentity(string identityName)
        {
            if (identityName.Contains("\\"))
                return identityName.Substring(0,identityName.LastIndexOf("\\") + 1);
            else
                return identityName;
        }
    }
}
